﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CommonLib;

namespace CommonDAL
{
    public interface IFromDataObjectMapper<TIdentity, TUniqueKey, TBusinessEntity, TDataEntity>
        where TIdentity : struct
        where TUniqueKey : struct
        where TBusinessEntity : class, IBusinessEntity<TUniqueKey>
        where TDataEntity : class, IDataEntity<TIdentity, TUniqueKey, TBusinessEntity>, TBusinessEntity
    {
        int Update(TDataEntity dataEntity);
        TIdentity Insert(TDataEntity dataEntity);
        int Delete(TDataEntity dataEntity);
    }

    public interface IFromDataObjectMapperL<TUniqueKey, TBusinessEntity, TDataEntity> :
        IFromDataObjectMapper<long, TUniqueKey, TBusinessEntity, TDataEntity>
        where TUniqueKey : struct
        where TBusinessEntity : class, IBusinessEntity<TUniqueKey>
        where TDataEntity : class, IDataEntity<long, TUniqueKey, TBusinessEntity>, TBusinessEntity
    {
    }
}
